package com.resign.carl.adapter.api;

/**
 * Created by carl.zhao on 2016/6/15.
 */
public class DuckAdapter implements Turkey {

    private Duck duck;

    public DuckAdapter(Duck duck){
        this.duck = duck;
    }

    @Override
    public void gobble() {
        duck.quack();
    }

    @Override
    public void fly() {
        for(int i = 0; i < 5; i++){
            duck.fly();
        }
    }
}
